from django.shortcuts import render
from rest_framework.response import Response
from .models import User
# Create your views here.
from rest_framework.views import APIView


class RegisterUsernameView(APIView):
    def get(self,request,username):
        count=User.objects.filter(username=username).count()
        context={
            'count':count
        }
        return Response(context)